﻿#include <iostream>
#include <deque>
using namespace std;

int main() {
    deque<string> dq;

    dq.push_back("wei1");
    dq.push_back("wei2");
    dq.push_front("to1");
    dq.push_front("to2");

    while (!dq.empty()) {
        cout << dq.front() << " ";
        dq.pop_front();  // 或者 pop_back()
    }
    cout << endl;

    return 0;
}
